import Vue from 'vue'
import VueRouter from 'vue-router'
import Manage from '@/pages/Manage.vue'
import Home from '@/pages/Home.vue'
import Login from '@/pages/Login.vue'
import Doctor from "@/pages/Doctor"
import Person from "@/pages/Person";
import File from "@/pages/File";
import Nurse from "@/pages/Nurse";
import Patient from "@/pages/Patient";
import Room from "@/pages/Room";
import Sector from "@/pages/Sector";

Vue.use(VueRouter)
const router = new VueRouter({
  routes : [
    {
      path: '/',
      name: 'Login',
      component: Login
    },

    {
      path: '/manage',
      name: 'Manage',
      component: Manage,
      redirect: "/manage/home",
      children: [
        {
          path: 'home',
          name: '首页',
          component: Home
        },
        {
          path: 'doctor',
          name: '医生列表',
          component: Doctor
        },
        {
          path: 'person',
          name: '个人信息',
          component: Person
        },
        {
          path: 'file',
          name: '文件列表',
          component: File
        },
        {
          path: 'nurse',
          name: '护士列表',
          component: Nurse
        },
        {
          path: 'patient',
          name: '病人列表',
          component: Patient
        },
        {
          path: 'room',
          name: '病房列表',
          component: Room
        },
        {
          path: 'sector',
          name: '科室列表',
          component: Sector
        },
      ]
    },

  ]
})

export default router

